//
//  NetworkTimeoutPlugin.swift
//  LiveTrivia
//
//  Created by Gesen on 2017/12/19.
//  Copyright © 2017年 LiveTrivia. All rights reserved.
//

import Foundation
import Moya
//import Result

final class NetworkTimeoutPlugin: PluginType {

    func prepare(_ request: URLRequest, target: TargetType) -> URLRequest {
        
        var request = request
        
        request.timeoutInterval = 30
        
//        if let target = target as? BarrageService {
//
//            switch target {
//            case .list:
//                request.timeoutInterval = 10
//            default: break
//            }
//        }
//
        return request
    }
    
}
